<template>
  <div>
    <!-- <div>
      <tip-tree-card :trees="trees" @change="changeData"></tip-tree-card>
    </div> -->
    <platform-overview v-if="indexStyle === 1" />
    <shop-overview v-else />
  </div>
</template>

<script>
import ShopOverview from '../gospel/statistics/ShopOverview'
import PlatformOverview from '../gospel/statistics/PlatformOverview'
// import TipTreeCard from '@/components/gospel/TipTreeCard'
import { SHOP_TYPE } from "@/store/mutation-types"
import Vue from "vue"

export default {
  name: "Analysis",
  components: {
    ShopOverview,
    PlatformOverview,
    // TipTreeCard
  },
  data () {
    return {
      indexStyle: 1,
      // trees: {
      //   uid: '111',
      //   username: '111',
      //   nickname: '111',
      //   num: '111',
      //   createTime: '111',
      //   children: [{
      //     uid: '22',
      //     username: '22',
      //     nickname: '22',
      //     num: '22',
      //     createTime: '22',
      //     children: null
      //   }, {
      //     uid: '33',
      //     username: '33',
      //     nickname: '33',
      //     num: '33',
      //     createTime: '33',
      //     children: null
      //   }]
      // }
    }
  },
  created () {
    this.indexStyle = Vue.ls.get(SHOP_TYPE)
  },
  methods: {
    changeData (e) {
      console.log(e)
    }
  }
}
</script>